import {Image, ScrollView, StyleSheet, Text, View} from 'react-native';
import Images from '../images/Images';
import TouchableView from '../components/touchableView';
import screen from '../utils/screen';
import React, {useEffect} from 'react';
import {ThemeColor} from '../utils/common';
import {useHeaderHeight} from '@react-navigation/elements';
import {useNavigation,useRoute} from '@react-navigation/native';
import LGBtn from '../components/touchableView/lgBtn';


const LoanSuccess = ()=>{

    const headerHeight = useHeaderHeight()
    const navigation = useNavigation()
    const {params} = useRoute()

    useEffect(()=>{

    },[])

    return (
        <View style={[styles.container,{paddingTop:headerHeight}]}>
            <ScrollView
                contentContainerStyle={{paddingTop:30,paddingHorizontal:30}}
            >
                <Image source={Images.success} style={{width:screen.PIXEL_140,height:screen.PIXEL_140,alignSelf:'center'}} resizeMode={'contain'}/>
                <Text style={{color:'#111',fontSize:20,alignSelf:'center'}}>申请提交成功</Text>
                <Text style={{color:'#666',marginTop:20,fontSize:14,textAlign:'center',alignSelf:'center'}}>您的贷款申请已提交系统，我们将{'\n'}尽快处理并通知您结果</Text>

                <View style={styles.content}>
                    <View style={[styles.itemRow]}>
                        <Text style={{color:'#666',fontSize:13}}>流水号:</Text>
                        <Text style={{color:'#666',fontSize:13}}>111</Text>
                    </View>

                    <View style={styles.itemRow}>
                        <Text style={{color:'#666',fontSize:13}}>申请人:</Text>
                        <Text style={{color:'#666',fontSize:13}}>蔡徐坤</Text>
                    </View>

                    <View style={styles.itemRow}>
                        <Text style={{color:'#666',fontSize:13}}>申请时间:</Text>
                        <Text style={{color:'#666',fontSize:13}}>2023-5-10</Text>
                    </View>
                </View>


                <View style={styles.content}>
                    <Image source={Images.qrcode}
                           style={{width:100,height:100,marginTop:30,tintColor:'#111',alignSelf:'center'}}
                           resizeMode={'contain'}/>
                    <Text style={{color:'#999',fontSize:16,alignSelf:'center'}}>请扫码获取最新处理信息</Text>
                </View>


                <LGBtn
                    title={'保存到本地'}
                    style={styles.nextBtn}
                    onPress={()=>{

                    }}
                />

            </ScrollView>
        </View>
    )
}
export default LoanSuccess

const styles = StyleSheet.create({
    container:{
        flex:1, backgroundColor:ThemeColor.theme
    },
    content:{
        backgroundColor: '#F6F8FB',padding:screen.PIXEL_24,borderRadius:screen.PIXEL_16,
        marginTop:30
    },
    itemRow:{
        flexDirection: 'row',alignItems:'center',justifyContent:'space-between',marginTop: 10
    },
    nextBtn:{
        alignSelf:'center',marginTop:30

    }
})
